﻿CREATE TABLE [jcms_module_article] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ClassId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(150) NOT NULL ,
	[TColor] varchar(8) NULL ,
	[AddDate] datetime NULL,
	[Summary] text NOT NULL DEFAULT "" ,
	[Editor] varchar(20) NOT NULL DEFAULT "",
	[Author] varchar(30) NOT NULL DEFAULT "",
	[Tags] varchar(60) NOT NULL DEFAULT "",
	[ViewNum] int NOT NULL DEFAULT "0" ,
	[IsPass] int NOT NULL ,
	[IsImg] int NOT NULL DEFAULT "0" ,
	[Img] varchar(150) NOT NULL DEFAULT "",
	[IsTop] int NOT NULL DEFAULT "0" ,
	[Correlation] varchar(100) NOT NULL DEFAULT "",
	[UserId] int NOT NULL DEFAULT "0" ,
	[ReadGroup] int NOT NULL DEFAULT "0" ,
	[SourceFrom] varchar(30) NOT NULL DEFAULT "",
	[Content] text NOT NULL,
	[OutUrl] varchar(100) NULL
)
GO

CREATE TABLE [jcms_module_article_collitem] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ClassId] int NOT NULL DEFAULT "0" ,
	[WebName] varchar(50) NULL ,
	[WebUrl] varchar(100) NULL ,
	[ItemDemo] varchar(200) NULL ,
	[ListStr] varchar(200) NULL ,
	[LsString] text NOT NULL DEFAULT "" ,
	[LoString] text NOT NULL DEFAULT "" ,
	[HsString] text NOT NULL DEFAULT "" ,
	[HoString] text NOT NULL DEFAULT "" ,
	[TsString] text NOT NULL DEFAULT "" ,
	[ToString] text NOT NULL DEFAULT "" ,
	[CsString] text NOT NULL DEFAULT "" ,
	[CoString] text NOT NULL DEFAULT "" ,
	[NPsString] text NOT NULL DEFAULT "" ,
	[NPoString] text NOT NULL DEFAULT "" ,
	[AuthorStr] varchar(50) NULL ,
	[SourceFrom] varchar(30) NOT NULL DEFAULT "",
	[Flag] int NOT NULL DEFAULT "0" ,
	[Script_Iframe] int NOT NULL DEFAULT "0" ,
	[Script_Object] int NOT NULL DEFAULT "0" ,
	[Script_Script] int NOT NULL DEFAULT "0" ,
	[Script_Div] int NOT NULL DEFAULT "0" ,
	[Script_Table] int NOT NULL DEFAULT "0" ,
	[Script_Span] int NOT NULL DEFAULT "0" ,
	[Script_Img] int NOT NULL DEFAULT "0" ,
	[Script_Font] int NOT NULL DEFAULT "0" ,
	[Script_A] int NOT NULL DEFAULT "0" ,
	[Script_Html] int NOT NULL DEFAULT "0" ,
	[CollecNewsNum] int NOT NULL DEFAULT "0" ,
	[SaveFiles] int NOT NULL DEFAULT "0" ,
	[CollecOrder] int NOT NULL DEFAULT "0" ,
	[ListWebEncode] varchar(50) NULL ,
	[ContentWebEncode] varchar(50) NULL
)
GO

CREATE TABLE [jcms_module_article_collfilters] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ItemId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(50) NULL ,
	[Filter_Object] int NOT NULL DEFAULT "0" ,
	[Filter_Type] int NOT NULL DEFAULT "0" ,
	[Filter_Content] text NOT NULL DEFAULT "" ,
	[FisString] text NOT NULL DEFAULT "" ,
	[FioString] text NOT NULL DEFAULT "" ,
	[Filter_Rep] text NOT NULL DEFAULT "" ,
	[Flag] int NOT NULL DEFAULT "0" ,
	[PublicTf] int NOT NULL DEFAULT "0"
)
GO


CREATE TABLE [jcms_module_article_collhistory] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ItemId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(100) NULL ,
	[CollectDate] datetime NULL ,
	[NewsUrl] varchar(200) NULL ,
	[ResultStr] varchar(200) NULL ,
	[Result] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_module_photo] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ClassId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(150) NOT NULL ,
	[TColor] varchar(50) NOT NULL DEFAULT "",
	[AddDate] datetime NULL,
	[Summary] text NOT NULL DEFAULT "" ,
	[Editor] varchar(20) NOT NULL DEFAULT "",
	[Author] varchar(30) NOT NULL DEFAULT "",
	[Tags] varchar(60) NOT NULL DEFAULT "",
	[ViewNum] int NOT NULL DEFAULT "0" ,
	[IsPass] int NOT NULL ,
	[IsImg] int NOT NULL DEFAULT "0" ,
	[Img] varchar(150) NOT NULL DEFAULT "",
	[IsTop] int NOT NULL DEFAULT "0" ,
	[Correlation] varchar(100) NOT NULL DEFAULT "",
	[UserId] int NOT NULL DEFAULT "0" ,
	[ReadGroup] int NOT NULL DEFAULT "0" ,
	[SourceFrom] varchar(30) NOT NULL DEFAULT "",
	[PhotoUrl] text NOT NULL DEFAULT "" ,
	[PageSize] int NOT NULL DEFAULT "0",
	[OutUrl] varchar(100) NULL
)
GO

CREATE TABLE [jcms_module_soft] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ClassId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(150) NOT NULL ,
	[TColor] varchar(50) NOT NULL DEFAULT "",
	[AddDate] datetime NULL,
	[Summary] text NOT NULL DEFAULT "" ,
	[Editor] varchar(20) NOT NULL DEFAULT "",
	[Author] varchar(30) NOT NULL DEFAULT "",
	[Tags] varchar(60) NOT NULL DEFAULT "",
	[ViewNum] int NOT NULL DEFAULT "0" ,
	[IsPass] int NOT NULL ,
	[IsImg] int NOT NULL DEFAULT "0" ,
	[Img] varchar(150) NOT NULL DEFAULT "",
	[IsTop] int NOT NULL DEFAULT "0" ,
	[Correlation] varchar(100) NOT NULL DEFAULT "",
	[UserId] int NOT NULL DEFAULT "0" ,
	[ReadGroup] int NOT NULL DEFAULT "0" ,
	[SourceFrom] varchar(30) NOT NULL DEFAULT "",
	[Version] varchar(100) NOT NULL DEFAULT "",
	[OperatingSystem] varchar(255) NULL ,
	[UnZipPass] varchar(100) NOT NULL DEFAULT "",
	[DemoUrl] varchar(255) NULL ,
	[RegUrl] varchar(255) NULL ,
	[SSize] varchar(20) NULL ,
	[Points] int NOT NULL DEFAULT "0" ,
	[DownUrl] text NOT NULL DEFAULT "" ,
	[DownNum] int NOT NULL DEFAULT "0",
	[OutUrl] varchar(100) NULL
)
GO

CREATE TABLE [jcms_module_soft_downlogs] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[UserId] int NOT NULL DEFAULT "0" ,
	[SoftId] int NOT NULL DEFAULT "0" ,
	[Points] int NOT NULL DEFAULT "0" ,
	[DownTime] datetime NULL,
	[DownIP] varchar(16) NULL ,
	[DownDegree] int NOT NULL DEFAULT "0"
)
GO


CREATE TABLE [jcms_module_video] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[ClassId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(150) NOT NULL ,
	[TColor] varchar(50) NOT NULL DEFAULT "",
	[AddDate] datetime NULL,
	[Summary] text NOT NULL DEFAULT "" ,
	[Editor] varchar(20) NOT NULL DEFAULT "",
	[Author] varchar(30) NOT NULL DEFAULT "",
	[Tags] varchar(60) NOT NULL DEFAULT "",
	[ViewNum] int NOT NULL DEFAULT "0" ,
	[IsPass] int NOT NULL ,
	[IsImg] int NOT NULL DEFAULT "0" ,
	[Img] varchar(150) NOT NULL DEFAULT "",
	[IsTop] int NOT NULL DEFAULT "0" ,
	[Correlation] varchar(100) NOT NULL DEFAULT "",
	[UserId] int NOT NULL DEFAULT "0" ,
	[ReadGroup] int NOT NULL DEFAULT "0" ,
	[SourceFrom] varchar(30) NOT NULL DEFAULT "",
	[VideoUrl] text NOT NULL DEFAULT "" ,
	[PageSize] int NOT NULL DEFAULT "0",
	[OutUrl] varchar(100) NULL
)
GO

CREATE TABLE [jcms_normal_adminlogs] (
	[Id] AutoIncrement primary key ,
	[AdminId] int NOT NULL ,
	[OperInfo] varchar(200) NOT NULL DEFAULT "",
	[OperTime] datetime NULL,
	[OperIP] varchar(15) NULL
)
GO

CREATE TABLE [jcms_normal_channel] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(20) NOT NULL ,
	[Info] varchar(200) NOT NULL DEFAULT "",
	[ClassDepth] int NOT NULL DEFAULT "0" ,
	[Dir] varchar(20) NOT NULL ,
	[pId] int NOT NULL DEFAULT "0" ,
	[ItemName] varchar(10) NOT NULL DEFAULT "",
	[ItemUnit] varchar(6) NULL ,
	[TemplateId] int NOT NULL DEFAULT "0" ,
	[Type] varchar(10) NOT NULL DEFAULT "",
	[IsOut] int NOT NULL DEFAULT "0" ,
	[OutUrl] varchar(100) NOT NULL DEFAULT "",
	[Target] int NOT NULL DEFAULT "0" ,
	[Enabled] int NOT NULL DEFAULT "0" ,
	[IsNav] int NOT NULL DEFAULT "0" ,
	[DefaultThumbs] int NOT NULL DEFAULT "0" ,
	[IsPost] int NOT NULL DEFAULT "0" ,
	[IsHtml] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_channel] (Title,Info,Dir,pId,ItemName,ItemUnit,TemplateId,Type,IsOut,OutUrl,Target,Enabled,IsNav,IsHtml,DefaultThumbs,IsPost,ClassDepth) values('网站首页','','',1,'','',0,'system', 1,'/',0,1,1,0,0,0,1)
GO

CREATE TABLE [jcms_normal_class] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL ,
	[ParentId] int NOT NULL ,
	[Title] varchar(20) NOT NULL ,
	[Info] varchar(100) NOT NULL DEFAULT "",
	[Number] varchar(10) NOT NULL DEFAULT "",
	[Code] varchar(40) NOT NULL DEFAULT "",
	[IsPost] int NOT NULL DEFAULT "0" ,
	[IsTop] int NOT NULL DEFAULT "0" ,
	[TopicNum] int NOT NULL DEFAULT "0" ,
	[TemplateId] int NOT NULL DEFAULT "0" ,
	[ContentTemp] int NOT NULL DEFAULT "0" ,
	[PageSize] int NOT NULL DEFAULT "0" ,
	[IsOut] int NOT NULL DEFAULT "0" ,
	[OutUrl] varchar(100) NOT NULL DEFAULT "",
	[ReadGroup] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_extends] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(20) NOT NULL DEFAULT "",
	[Name] varchar(20) NOT NULL DEFAULT "",
	[Author] varchar(20) NOT NULL DEFAULT "",
	[Info] varchar(50) NOT NULL DEFAULT "",
	[Type] int NOT NULL DEFAULT "0" ,
	[pId] int NOT NULL ,
	[BaseTable] varchar(200) NOT NULL DEFAULT "",
	[ManageUrl] varchar(50) NOT NULL DEFAULT "",
	[CSSData] text NOT NULL DEFAULT "" ,
	[JsData] text NOT NULL DEFAULT "" ,
	[Enabled] int NOT NULL DEFAULT "0" ,
	[Locked] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_forbidip] (
	[Id] AutoIncrement primary key ,
	[StartIP] float NULL ,
	[StartIP2] varchar(16) NULL ,
	[EndIP] float NULL ,
	[EndIP2] varchar(16) NULL ,
	[ExpireDate] datetime NULL,
	[Enabled] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_javascript] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL ,
	[Code] varchar(64) NOT NULL DEFAULT "",
	[ChannelId] int NOT NULL DEFAULT "0",
	[ClassId] int NOT NULL DEFAULT "0",
	[SelectNumber] int NOT NULL DEFAULT "0",
	[TitleLen] int NOT NULL DEFAULT "0",
	[JumbotLiCode] varchar(30) NOT NULL DEFAULT ""
)
GO

CREATE TABLE [jcms_normal_mtag] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL DEFAULT "",
	[Img] varchar(150) NOT NULL DEFAULT "",
	[Proclaim] varchar(200) NOT NULL DEFAULT "",
	[JoinPower] int NOT NULL DEFAULT "0" ,
	[ViewPower] int NOT NULL DEFAULT "0" ,
	[CloseApply] int NOT NULL DEFAULT "0" ,
	[SortId] int NOT NULL DEFAULT "0" ,
	[MemberTotal] int NOT NULL DEFAULT "0" ,
	[UpdateTime] datetime NULL,
	[UserId] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_mtag_member] (
	[Id] AutoIncrement primary key ,
	[UserId] int NOT NULL ,
	[MTagId] int NOT NULL ,
	[Power] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_mtag_thread] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[Content] text NOT NULL DEFAULT "" ,
	[MTagId] int NOT NULL ,
	[IsGood] int NOT NULL DEFAULT "0" ,
	[IsHead] int NOT NULL DEFAULT "0" ,
	[AddTime] datetime NULL,
	[ReplyCount] int NOT NULL DEFAULT "0" ,
	[UserId] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_mtag_thread_reply] (
	[Id] AutoIncrement primary key ,
	[Content] text NOT NULL DEFAULT "" ,
	[MTagId] int NOT NULL ,
	[ThreadId] int NOT NULL ,
	[AddTime] datetime NULL,
	[UserId] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_mtag_sort] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[Info] varchar(200) NOT NULL DEFAULT "",
	[State] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_mtag_sort] (Title,Info,State) values('自由联盟','自由联盟',1)
GO
INSERT INTO [jcms_normal_mtag_sort] (Title,Info,State) values('兴趣联盟','兴趣联盟',1)
GO
INSERT INTO [jcms_normal_mtag_sort] (Title,Info,State) values('技术交流','技术交流',1)
GO
INSERT INTO [jcms_normal_mtag_sort] (Title,Info,State) values('协同合作','协同合作',1)
GO

CREATE TABLE [jcms_normal_modules] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL ,
	[Type] varchar(10) NOT NULL DEFAULT "",
	[PId] int NOT NULL DEFAULT "0" ,
	[Enabled] int NOT NULL DEFAULT "0" ,
	[Locked] int NOT NULL DEFAULT "0" ,
	[SearchFieldValues] varchar(200) NOT NULL DEFAULT "",
	[SearchFieldTexts] varchar(200) NULL
)
GO
INSERT INTO [jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts) values('文章','article',1,1,1,'title,summary','标题,简介')
GO
INSERT INTO [jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts) values('图片','photo',2,1,1,'title,summary','标题,简介')
GO
INSERT INTO [jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts) values('下载','soft',3,1,1,'title,summary','标题,简介')
GO
INSERT INTO [jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts) values('视频','video',4,1,1,'title,summary','标题,简介')
GO

CREATE TABLE [jcms_normal_page] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(20) NOT NULL DEFAULT "",
	[SId] int NOT NULL DEFAULT "0" ,
	[Source] varchar(50) NULL
)
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('关于我们',1,'index.html')
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('本站服务',1,'service.html')
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('广告合作',1,'adver.html')
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('联系方式',1,'contactus.html')
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('支付方式',1,'payment.html')
GO
INSERT INTO [jcms_normal_page] (Title,SId,Source) values('会员帮助',2,'index.html')
GO


CREATE TABLE [jcms_normal_page_sort] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(20) NOT NULL DEFAULT "",
	[Info] varchar(200) NOT NULL DEFAULT "",
	[Dir] varchar(50) NULL
)
GO
INSERT INTO [jcms_normal_page_sort] (Title,Info,Dir) values('本站介绍','','about')
GO
INSERT INTO [jcms_normal_page_sort] (Title,Info,Dir) values('帮助中心','','help')
GO

CREATE TABLE [jcms_normal_pointscard] (
	[Id] AutoIncrement primary key ,
	[CardNumber] varchar(16) NULL ,
	[CardPassword] varchar(32) NULL ,
	[UserId] int NOT NULL DEFAULT "0" ,
	[Points] int NOT NULL,
	[LimitedDate] datetime NULL,
	[ActiveTime] datetime NULL,
	[ActiveIP] varchar(15) NULL ,
	[State] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_pointscard_sort] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL DEFAULT "",
	[Points] int NOT NULL
)
GO
INSERT INTO [jcms_normal_pointscard_sort] (Title,Points) values('50元=>50点',50)
GO
INSERT INTO [jcms_normal_pointscard_sort] (Title,Points) values('100元=>100点',100)
GO
INSERT INTO [jcms_normal_pointscard_sort] (Title,Points) values('200元=>200点',200)
GO
INSERT INTO [jcms_normal_pointscard_sort] (Title,Points) values('500元=>500点',500)
GO
INSERT INTO [jcms_normal_pointscard_sort] (Title,Points) values('1000元=>1000点',1000)
GO

CREATE TABLE [jcms_normal_skins] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(30) NOT NULL DEFAULT "",
	[Source] varchar(50) NOT NULL DEFAULT "",
	[BodyWidth] int NOT NULL DEFAULT "0" ,
	[LeftWidth] int NOT NULL DEFAULT "0" ,
	[RightWidth] int NOT NULL DEFAULT "0" ,
	[TitleColor] varchar(10) NOT NULL DEFAULT "",
	[BorderColor] varchar(10) NOT NULL DEFAULT "",
	[TintBackground] varchar(10) NOT NULL DEFAULT "",
	[DarkBackground] varchar(10) NULL
)
GO
INSERT INTO [jcms_normal_skins] (Title,Source,BodyWidth,LeftWidth,RightWidth,TitleColor,BorderColor,TintBackground,DarkBackground) values('浅蓝色宽屏','blue1002',1002,252,740,'#00599B','#AACCEE','#F4F9FD','#316395')
GO
INSERT INTO [jcms_normal_skins] (Title,Source,BodyWidth,LeftWidth,RightWidth,TitleColor,BorderColor,TintBackground,DarkBackground) values('浅蓝色中屏','blue0912',912,222,680,'#00599B','#AACCEE','#F4F9FD','#316395')
GO
INSERT INTO [jcms_normal_skins] (Title,Source,BodyWidth,LeftWidth,RightWidth,TitleColor,BorderColor,TintBackground,DarkBackground) values('浅蓝色窄屏','blue0788',788,178,600,'#00599B','#AACCEE','#F4F9FD','#316395')
GO



CREATE TABLE [jcms_normal_special] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[Info] varchar(200) NOT NULL DEFAULT "",
	[Source] varchar(50) NULL
)
GO

CREATE TABLE [jcms_normal_specialcontent] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[sId] int NOT NULL ,
	[ChannelId] int NOT NULL ,
	[ContentId] int NOT NULL
)
GO

CREATE TABLE [jcms_normal_system] (
	[Id] AutoIncrement primary key ,
	[Info] text NOT NULL DEFAULT ""
)
GO
INSERT INTO [jcms_normal_system] (Info) Values('网站名称§1§系统正在升级中…§0§0|23§1§1§0§20§http://127.0.0.1§§§1§/§.htm§')
GO

CREATE TABLE [jcms_normal_tag] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(15) NOT NULL ,
	[ClickTimes] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_template] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[PId] int NOT NULL DEFAULT "0" ,
	[Type] varchar(50) NOT NULL DEFAULT "",
	[SType] varchar(50) NOT NULL DEFAULT "",
	[IsDefault] int NOT NULL DEFAULT "0" ,
	[Source] varchar(50) NOT NULL DEFAULT "",
	[SkinId] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板站点首页',1,'system','index',1,'system_index.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板文章频道页',1,'article','channel',1,'article_channel.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板文章列表页',1,'article','class',1,'article_class.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板文章内容页',1,'article','content',1,'article_content.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板下载频道页',1,'soft','channel',1,'soft_channel.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板下载列表页',1,'soft','class',1,'soft_class.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板下载内容页',1,'soft','content',1,'soft_content.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板图片频道页',1,'photo','channel',1,'photo_channel.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板图片列表页',1,'photo','class',1,'photo_class.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板图片内容页',1,'photo','content',1,'photo_content.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板视频频道页',1,'video','channel',1,'video_channel.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板视频列表页',1,'video','class',1,'video_class.htm',2)
GO
INSERT INTO [jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,SkinId) values('默认模板视频内容页',1,'video','content',1,'video_content.htm',2)
GO


CREATE TABLE [jcms_normal_templatecontentli] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL ,
	[Code] varchar(30) NOT NULL DEFAULT "",
	[Fields] text NOT NULL DEFAULT "",
	[OrderBy] varchar(20) NOT NULL DEFAULT "",
	[IsTop] int NOT NULL DEFAULT "0",
	[IsImg] int NOT NULL DEFAULT "0",
	[TitleLen] int NOT NULL DEFAULT "0",
	[SummaryLen] int NOT NULL DEFAULT "0",
	[DateFormat] varchar(20) NOT NULL DEFAULT "",
	[Repeat] text NOT NULL DEFAULT "" ,
	[Content] text NOT NULL DEFAULT ""
)
GO

CREATE TABLE [jcms_normal_templatelabel] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[Info] varchar(200) NOT NULL DEFAULT "",
	[PId] int NOT NULL DEFAULT "0" ,
	[Sort] int NOT NULL DEFAULT "0" ,
	[Source] varchar(100) NOT NULL DEFAULT ""
)
GO

CREATE TABLE [jcms_normal_templateproject] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(100) NOT NULL DEFAULT "",
	[Info] varchar(200) NOT NULL DEFAULT "",
	[Dir] varchar(50) NOT NULL DEFAULT "",
	[IsDefault] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_templateproject] (Title,Info,Dir,isDefault) values('默认模板','','default',1)
GO

CREATE TABLE [jcms_normal_thumbs] (
	[Id] AutoIncrement primary key ,
	[ChannelId] int NOT NULL DEFAULT "0" ,
	[Title] varchar(30) NOT NULL DEFAULT "",
	[iWidth] int NOT NULL DEFAULT "0" ,
	[iHeight] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'360X270',360,270)
GO
INSERT INTO [jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'240X180',240,180)
GO
INSERT INTO [jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'150X120',150,120)
GO
INSERT INTO [jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'128X96',128,96)
GO

CREATE TABLE [jcms_normal_user] (
	[Id] AutoIncrement primary key ,
	[UserName] varchar(20) NOT NULL DEFAULT "",
	[UserPass] varchar(40) NOT NULL DEFAULT "",
	[TrueName] varchar(20) NOT NULL DEFAULT "",
	[Question] varchar(30) NOT NULL DEFAULT "",
	[Answer] varchar(20) NOT NULL DEFAULT "",
	[Sex] int NOT NULL ,
	[Email] varchar(80) NOT NULL DEFAULT "",
	[Group] int NOT NULL DEFAULT "0" ,
	[State] int NOT NULL DEFAULT "0" ,
	[Cookies] varchar(10) NOT NULL DEFAULT "",
	[RegTime] datetime NULL,
	[RegIp] varchar(15) NULL ,
	[LastTime] datetime NULL,
	[LastIp] varchar(15) NULL ,
	[HomePage] varchar(100) NOT NULL DEFAULT "",
	[QQ] varchar(50) NOT NULL DEFAULT "",
	[ICQ] varchar(50) NOT NULL DEFAULT "",
	[MSN] varchar(50) NOT NULL DEFAULT "",
	[BirthDay] varchar(50) NOT NULL DEFAULT "",
	[ComeFrom] varchar(255) NULL ,
	[Login] int NOT NULL DEFAULT "0" ,
	[Points] int NOT NULL DEFAULT "0" ,
	[IsWriter] int NOT NULL DEFAULT "0" ,
	[IDType] int NOT NULL DEFAULT "0" ,
	[IDCard] varchar(30) NOT NULL DEFAULT "",
	[WorkUnit] varchar(100) NOT NULL DEFAULT "",
	[Address] varchar(100) NOT NULL DEFAULT "",
	[ZipCode] varchar(10) NOT NULL DEFAULT "",
	[Telephone] varchar(20) NOT NULL DEFAULT "",
	[Languages] varchar(50) NOT NULL DEFAULT "",
	[StudyWay] varchar(50) NOT NULL DEFAULT "",
	[MobileTel] varchar(11) NULL ,
	[GraduateFrom] varchar(50) NOT NULL DEFAULT "",
	[CardUserName] varchar(20) NOT NULL DEFAULT "",
	[CardBank] varchar(50) NOT NULL DEFAULT "",
	[CardNumber] varchar(50) NOT NULL DEFAULT "",
	[IsVIP] int NOT NULL DEFAULT "0",
	[VIPTime] datetime NULL,
	[Integral] int NOT NULL DEFAULT "0",
	[AdminId] int NOT NULL DEFAULT "0",
	[AdminName] varchar(20) NOT NULL DEFAULT "",
	[AdminPass] varchar(32) NULL DEFAULT "",
	[AdminFolder] varchar(50) NOT NULL DEFAULT "",
	[Setting] text NOT NULL DEFAULT "",
	[LastTime2] datetime NULL,
	[LastIp2] varchar(15) NULL ,
	[Cookiess] varchar(10) NOT NULL DEFAULT "",
	[MailSign] varchar(64) NULL ,
	[AdminState] int NOT NULL DEFAULT "0",
	[ForumName] varchar(20) NOT NULL DEFAULT "",
	[ForumPass] varchar(32) NULL DEFAULT ""
)
GO

CREATE TABLE [jcms_normal_user_logs] (
	[Id] AutoIncrement primary key ,
	[UserId] int NOT NULL ,
	[OperInfo] varchar(200) NOT NULL DEFAULT "",
	[OperType] int NOT NULL DEFAULT "0" ,
	[OperTime] datetime NULL,
	[OperIP] varchar(15) NULL
)
GO

CREATE TABLE [jcms_normal_user_apply] (
	[Id] AutoIncrement primary key ,
	[UserId] int NOT NULL ,
	[ApplyInfo] varchar(200) NOT NULL DEFAULT "",
	[ApplyType] int NOT NULL DEFAULT "0" ,
	[ApplyTime] datetime NULL,
	[ApplyIP] varchar(15) NULL ,
	[MailSign] varchar(64) NULL ,
	[ApplyNumber] int NOT NULL DEFAULT "0" ,
	[Checked] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_user_friends] (
	[Id] AutoIncrement primary key ,
	[UserId] int NOT NULL ,
	[AddDate] datetime NULL,
	[FriendId] int NOT NULL
)
GO

CREATE TABLE [jcms_normal_user_message] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL DEFAULT "",
	[Content] text NOT NULL DEFAULT "" ,
	[SendIP] varchar(15) NULL ,
	[SendUserId] int NOT NULL ,
	[ReceiveUserId] int NOT NULL ,
	[ReceiveUserName] varchar(20) NOT NULL DEFAULT "",
	[AddDate] datetime NULL,
	[State] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_user_favorite] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(150) NOT NULL ,
	[ModuleType] varchar(20) NOT NULL DEFAULT "",
	[ChannelId] int NOT NULL ,
	[ContentId] int NOT NULL ,
	[AddDate] datetime NULL,
	[UserId] int NOT NULL
)
GO

CREATE TABLE [jcms_normal_user_notice] (
	[Id] AutoIncrement primary key ,
	[Title] varchar(50) NOT NULL DEFAULT "",
	[Content] varchar(250) NOT NULL DEFAULT "",
	[NoticeType] varchar(16) NULL ,
	[UserId] int NOT NULL ,
	[AddDate] datetime NULL,
	[State] int NOT NULL DEFAULT "0"
)
GO

CREATE TABLE [jcms_normal_usergroup] (
	[Id] AutoIncrement primary key ,
	[GroupName] varchar(50) NOT NULL DEFAULT "",
	[Setting] text NOT NULL DEFAULT "",
	[IsLogin] int NOT NULL DEFAULT "0" ,
	[UserTotal] int NOT NULL DEFAULT "0"
)
GO
INSERT INTO [jcms_normal_usergroup] (GroupName,setting,IsLogin,UserTotal) Values('临时用户','1,1,1,0|23,1,10,10,1,0,1,1,5,1,1,5,1,1,5,',1,0)
GO
INSERT INTO [jcms_normal_usergroup] (GroupName,setting,IsLogin,UserTotal) Values('初级用户','1,1,1,0|23,1,10,10,1,0,1,1,10,1,1,10,1,1,10,',1,0)
GO
INSERT INTO [jcms_normal_usergroup] (GroupName,setting,IsLogin,UserTotal) Values('中级用户','1,1,1,0|23,1,10,10,1,0,1,1,50,1,1,50,1,1,50,',1,0)
GO
INSERT INTO [jcms_normal_usergroup] (GroupName,setting,IsLogin,UserTotal) Values('高级用户','1,1,1,0|23,1,10,10,1,0,1,1,100,1,1,100,1,1,100,',1,0)
GO
INSERT INTO [jcms_normal_usergroup] (GroupName,setting,IsLogin,UserTotal) Values('管理用户','1,1,1,0|23,1,10,10,1,0,1,1,100,1,1,100,1,1,100,',1,0)
GO